home *** CD-ROM | disk | FTP | other *** search
- class §#6§ extends §#21§
- {
- static var §#3§ = false;
- static var §#33§ = 0;
- static var §#310§ = 1;
- static var §#335§ = 2;
- static var §#336§ = 3;
- static var §#171§ = 4;
- static var §#159§ = 5;
- static var §#215§ = 6;
- static var §#220§ = 7;
- static var §#157§ = 8;
- static var §#160§ = 9;
- static var §#148§ = ["#151","Walk Y","Walk Y","Walk left","Walk right","Center jump","Left angle jump","Left side jump","Right angle jump","Right side jump"];
- var §#7§ = 0;
- static var §#269§ = [undefined,"22","42","53"];
- var §#264§ = 0.6;
- static var §#139§ = 125;
- var §#398§ = 50;
- var §#402§ = 24;
- var §#432§ = 4;
- var §#47§ = false;
- var §#94§ = false;
- var §#57§ = false;
- var §#114§ = 0;
- var §#274§ = false;
- var §#194§ = 0;
- var §#175§ = 0;
- var size = 1;
- var scale = eval("#6")["#139"];
- var §#55§ = 0;
- var §#13§ = undefined;
- function §#6§()
- {
- super();
- this["#149"] = this._x;
- this["#100"] = this._y;
- _root["#11"]._visible = false;
- }
- function §#2§()
- {
- return "Player (f" + this._currentframe + "/" + this._totalframes + " s" + this["#7"] + " " + this["#34"]() + "): ";
- }
- function toString()
- {
- return "[Player id: " + this["#56"] + "(" + eval("#6")["#269"][this["#56"]] + ")" + ", x: " + this.x + ", y: " + this.y + ", state: " + this["#7"] + ", jumping: " + this["#47"] + ", startJump: " + this["#94"] + ", holding: " + this["#57"] + ", lastMove: " + this["#114"] + ", frame: " + this._currentframe + "/" + this._totalframes + "]";
- }
- function setID(§#56§)
- {
- if(eval("#6")["#3"])
- {
- eval("#0").log(this["#2"]() + "set player id to " + §#56§);
- }
- this["#56"] = §#56§;
- this.s = this.getSpeed();
- this["#135"]();
- this["#82"]();
- if(§#56§ == 3)
- {
- this.size = 1.12;
- }
- this["#99"]();
- if(eval("#6")["#3"])
- {
- eval("#0").log(this["#2"]() + "set player scale to " + this._xscale);
- }
- this["#13"] = new §#140§(10);
- if(eval("#6")["#3"])
- {
- eval("#0").log("created " + this.toString());
- }
- }
- function getSpeed()
- {
- return 7 + _root["#4"]["#328"];
- }
- function getShot()
- {
- return _root["#4"]["#342"];
- }
- function getPower()
- {
- if(this["#56"] == 1)
- {
- return 0.046;
- }
- if(this["#56"] == 2)
- {
- return 0.05;
- }
- return 0.06;
- }
- function §#45§()
- {
- this.removeMovieClip();
- }
- function update(§#16§)
- {
- if(this.numbers != undefined)
- {
- var _loc3_ = eval("#6")["#269"][this["#56"]];
- if(this["#7"] == eval("#6")["#215"] || this["#7"] == eval("#6")["#220"])
- {
- _loc3_ += " left";
- }
- else if(this["#7"] == eval("#6")["#157"] || this["#7"] == eval("#6")["#160"])
- {
- _loc3_ += " right";
- }
- else
- {
- _loc3_ += " center";
- }
- this.numbers.gotoAndStop(_loc3_);
- }
- var _loc5_ = Bounds["#119"](this.x,this.y);
- if(_loc5_ == undefined)
- {
- eval("#0").log(this["#2"]() + "y bound is undefined");
- }
- else
- {
- this.y = _loc5_;
- }
- this._y = this.y;
- var _loc6_ = Bounds["#118"](this.x,this.y);
- if(_loc6_ == undefined)
- {
- eval("#0").log(this["#2"]() + "x bound is undefined");
- }
- else
- {
- this.x = _loc6_;
- }
- this._x = this.x;
- var _loc8_ = this["#100"] - Bounds.getYMin();
- var _loc7_ = this["#100"] - this._y;
- this.scale = eval("#6")["#139"] - (eval("#6")["#139"] - 100) * (_loc7_ / _loc8_);
- this["#99"]();
- if(this["#11"]._visible)
- {
- this["#11"].update();
- var _loc4_ = this.getBallLocation();
- this["#13"].update(_loc4_.x,_loc4_.y,this["#11"]._alpha);
- }
- else
- {
- _root["#11"].update();
- this["#13"].update(_root["#11"]._x,_root["#11"]._y,_root["#11"]._alpha);
- }
- }
- function §#449§()
- {
- if(this.onFire)
- {
- this.tint += this["#98"];
- if(this.tint > this["#264"])
- {
- this.tint = this["#264"];
- this["#98"] = - this["#98"];
- }
- else if(this.tint < 0)
- {
- this.tint = 0;
- this["#98"] = - this["#98"];
- }
- this.setTint(this["#11"],this.tint);
- }
- }
- function setTint(§#240§, d)
- {
- var _loc2_ = new Color(§#240§);
- var _loc1_ = new Object();
- _loc1_.rb = (1 - d) * 255;
- _loc1_.gb = d * 180;
- _loc2_.setTransform(_loc1_);
- }
- function §#422§(§#240§)
- {
- var _loc2_ = new Color(§#240§);
- var _loc1_ = {rb:0,gb:0};
- _loc2_.setTransform(_loc1_);
- }
- function setSkinColor(§#240§, d)
- {
- var _loc3_ = new Color(§#240§);
- var _loc2_ = {rb:d,gb:d,bb:d,ab:0,ra:100,ga:100,ba:100,aa:100};
- _loc3_.setTransform(_loc2_);
- }
- function getBallLocation()
- {
- var _loc2_ = {x:this["#11"]._x,y:this["#11"]._y};
- this.localToGlobal(_loc2_);
- return _loc2_;
- }
- function §#129§()
- {
- eval("#1").getInstance()["#20"](eval("#1")["#195"]);
- }
- function §#113§()
- {
- this["#194"] = getTimer();
- if(eval("#6")["#3"])
- {
- eval("#0").log(this["#2"]() + "reached top of jump at time " + this["#194"]);
- }
- }
- function §#307§()
- {
- if(!this.onFire)
- {
- if(eval("#6")["#3"])
- {
- eval("#0").log(this["#2"]() + "start hot streak");
- }
- _root["#193"]["#254"]("You\'re on fire!");
- }
- this.onFire = true;
- this["#98"] = 0.1;
- this.tint = 0;
- this["#13"]["#345"]();
- this["#11"].gotoAndPlay("Fire");
- _root["#11"].gotoAndPlay("Fire");
- }
- function §#135§()
- {
- if(eval("#6")["#3"])
- {
- eval("#0").log(this["#2"]() + "stop hot streak");
- }
- this.onFire = false;
- this.tint = 0;
- this["#98"] = 0;
- this["#13"]["#262"]();
- this["#11"].gotoAndStop("#276");
- _root["#11"].gotoAndStop("#276");
- }
- function §#117§()
- {
- if(eval("#6")["#3"])
- {
- eval("#0").log(this["#2"]() + "end jump");
- }
- this.stop();
- }
- function hitTest(clip)
- {
- return this["#255"].hitTest(clip);
- }
- function §#344§()
- {
- if(eval("#6")["#3"])
- {
- eval("#0").log(this["#2"]() + "return ball");
- }
- this["#47"] = false;
- this["#94"] = false;
- this["#57"] = false;
- _root["#11"]._visible = false;
- this["#11"]._visible = true;
- this["#8"](eval("#6")["#33"]);
- }
- function §#82§()
- {
- this._x = this["#149"];
- this._y = this["#100"];
- this.x = this["#149"];
- this.y = this["#100"];
- this.scale = eval("#6")["#139"];
- this["#99"]();
- }
- function §#99§()
- {
- this._xscale = this.scale * this.size;
- this._yscale = this.scale * this.size;
- }
- function §#382§(§#190§)
- {
- this.y -= this.s;
- this["#8"](eval("#6")["#310"]);
- if(§#190§)
- {
- return undefined;
- }
- eval("#1").getInstance()["#20"](eval("#1")["#116"]);
- this["#114"] = getTimer();
- }
- function §#367§(§#190§)
- {
- this.y += this.s;
- this["#8"](eval("#6")["#335"]);
- if(§#190§)
- {
- return undefined;
- }
- eval("#1").getInstance()["#20"](eval("#1")["#116"]);
- this["#114"] = getTimer();
- }
- function §#368§(§#190§)
- {
- this["#8"](eval("#6")["#336"]);
- eval("#1").getInstance()["#20"](eval("#1")["#116"]);
- this.x -= this.s;
- this["#114"] = getTimer();
- }
- function §#391§()
- {
- if(!this["#47"])
- {
- this["#8"](eval("#6")["#33"]);
- }
- }
- function §#351§(§#190§)
- {
- this["#8"](eval("#6")["#171"]);
- eval("#1").getInstance()["#20"](eval("#1")["#116"]);
- this.x += this.s;
- this["#114"] = getTimer();
- }
- function §#392§()
- {
- if(!this["#47"])
- {
- this["#47"] = true;
- this["#94"] = true;
- this["#57"] = true;
- this["#55"] = eval("#14").getAngle(this._x,this._y,_root["#35"]._x,Bounds.getYMin() - 10);
- this["#55"] = eval("#14")["#299"](this["#55"]) - 180;
- var _loc6_ = 15;
- var _loc4_ = 45;
- if((this["#55"] < _loc4_ || this["#55"] > 180 - _loc4_) && this._y < Bounds.getYMin() + 100 * eval("#5").scale)
- {
- var _loc3_ = _root["#4"]["#9"]._x - _root["#42"]._x;
- var _loc5_ = _root["#4"]["#9"]._width * eval("#5").scale / 2;
- if(Math.abs(_loc3_) < _loc5_)
- {
- if(eval("#6")["#3"])
- {
- eval("#0").log("too close to net: " + _loc3_ + "/" + _loc5_);
- }
- if(_loc3_ < 0)
- {
- this.x -= _loc5_ + _loc3_;
- }
- else
- {
- this.x += _loc5_ - _loc3_;
- }
- }
- }
- if(this["#55"] < _loc6_)
- {
- this["#8"](eval("#6")["#160"]);
- }
- else if(this["#55"] < _loc4_)
- {
- this["#8"](eval("#6")["#157"]);
- }
- else if(this["#55"] < 180 - _loc4_)
- {
- this["#8"](eval("#6")["#159"]);
- }
- else if(this["#55"] < 180 - _loc6_)
- {
- this["#8"](eval("#6")["#215"]);
- }
- else
- {
- this["#8"](eval("#6")["#220"]);
- }
- }
- if(eval("#6")["#3"])
- {
- eval("#0").log(this["#2"]() + "already jumping");
- }
- return undefined;
- }
- function §#205#10§()
- {
- if(this["#94"] && this["#47"] && this["#57"])
- {
- this["#175"] = getTimer();
- if(eval("#6")["#3"])
- {
- eval("#0").log(this["#2"]() + "released space bar at time " + this["#175"]);
- }
- _root["#4"]["#112"] = _root["#4"]["#112"] + 1;
- this["#57"] = false;
- this["#94"] = false;
- }
- }
- function §#115§()
- {
- if(eval("#6")["#3"])
- {
- eval("#0").log(this["#2"]() + "shooting ball now");
- }
- var _loc3_ = this.getBallLocation();
- _root["#11"]._x = _loc3_.x;
- _root["#11"]._y = _loc3_.y;
- this["#11"]._visible = false;
- _root["#11"]._visible = true;
- _root["#11"]["#8"](eval("#10")["#172"]);
- if(this["#57"])
- {
- _root["#4"]["#112"] = _root["#4"]["#112"] + 1;
- this["#57"] = false;
- this["#94"] = false;
- }
- }
- function §#8§(§#97§)
- {
- if(§#97§ == this["#7"])
- {
- return undefined;
- }
- if(eval("#6")["#3"] && (this["#7"] > eval("#6")["#171"] || §#97§ > eval("#6")["#171"]))
- {
- eval("#0").log(this["#2"]() + "changing to state " + §#97§ + ": " + eval("#6")["#148"][§#97§]);
- }
- if(this["#7"] < eval("#6")["#159"] && §#97§ < eval("#6")["#159"])
- {
- var _loc5_ = this.getOffsetFromLabel(eval("#6")["#148"][this["#7"]]);
- var _loc3_ = this.getFrameForLabel(eval("#6")["#148"][§#97§]);
- var _loc4_ = _loc3_ + _loc5_;
- this.gotoAndPlay(_loc4_);
- }
- else
- {
- this.gotoAndPlay(eval("#6")["#148"][§#97§]);
- }
- if(§#97§ == eval("#6")["#157"] || §#97§ == eval("#6")["#160"])
- {
- this["#274"] = true;
- }
- else
- {
- this["#274"] = false;
- }
- this["#7"] = §#97§;
- }
- }
-